<template lang="html">
  <div class="main-page" id="store-page">
    <!-- 主体内容 -->
    <div class="main-content has-header-space">
      <div class="national_content">
        <div class="national_top"></div>
        <div class="prd_1" @click="continueBuyList(767,4316)"></div>
        <div class="prd_2" @click="continueBuyList(689,3940)"></div>
        <div class="prd_3" @click="continueBuyList(1058,4443)"></div>
        <div class="prd_4" @click="continueBuyList(1464,4867)"></div>
        <div class="prd_5" @click="continueBuyList(643,3816)"></div>
        <div class="national_two"></div>
        <div class="prd_6" @click="continueBuyList(918,4288)"></div>
        <div class="prd_7" @click="continueBuyList(664,3840)"></div>
        <div class="prd_8" @click="continueBuyList(738,4017)"></div>
        <div class="prd_9" @click="continueBuyList(649,3822)"></div>
        <div class="prd_10" @click="continueBuyList(536,3607)"></div>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  data () {
    return {
    }
  },
  created () {
  },

  methods: {
    continueBuyList (id, defaultItemId) {
      let isMini = sessionStorage.getItem('isMini')
      let params = '?pid=' + id + '&item_id=' + defaultItemId
      if (isMini) {
        window.wx.miniProgram.navigateTo({ url: '/pages/shopDetails/shopDetails' + params })
      } else {
        this.$router.push('/main/shopDetails' + params)
      }
    }
  }
}
</script>
